package org.dreamwork.seagragon;

import javax.servlet.ServletContext;
import java.io.OutputStream;

/**
 * Created by IntelliJ IDEA.
 * User: seth
 * Date: 2010-4-24
 * Time: 18:02:26
 */
public class Runtime {
    private ServletContext context;

    private static Runtime runtime;

    private Runtime (ServletContext context) {
        this.context = context;
    }

    public static Runtime getRuntime (ServletContext context) {
        if (runtime == null)
            runtime = new Runtime (context);
        return runtime;
    }

    public void executeWebPage (String url, OutputStream out) {
        new WebPageWorker (context, out, url).start ();
    }
}